import java.util.Comparator;
import java.util.Map;

public class FrequencesComparator implements Comparator<Map.Entry<Character, Integer>> {

	public int compare(Map.Entry<Character, Integer> entree1, Map.Entry<Character, Integer> entree2) {
		Integer frequence1 = (Integer) entree1.getValue();
		Integer frequence2 = (Integer) entree2.getValue();

		return frequence1.compareTo(frequence2);
	}
}
